package com.maltys.redission.manager;

import org.redisson.api.RBloomFilter;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author malty
 */
@Component
public class RedissonManager {
    @Autowired
    private RedissonClient redissonClient;

    public RBloomFilter getABloomFilter() {
        RBloomFilter<Object> bloomFilter = redissonClient.getBloomFilter("test");
        bloomFilter.tryInit(1000000, 0.01);
        return bloomFilter;
    }
}
